]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Only hide the notification stack on clicking close
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 19 Sep 2012 03:37:24 +0000 (00:37 -0300)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 25 Oct 2012 20:41:05 +0000 (22:41 +0200)
Rather than destroying the entire source, which is unintuitive, simply
close the notification. Removing the entire source is still possible
by right-clicking on the summary item and choosing "Remove".

https://bugzilla.gnome.org/show_bug.cgi?id=682237

js/ui/messageTray.js

index a425926f4df9e5f62ea82507b4b0e06b641d90f6..9c9221f358bf9cadd622e72da9d469475e4fa8a3 100644 (file)
@@ -1247,10 +1247,6 @@ const SummaryItem = new Lang.Class({
         this.notificationStackWidget.add_actor(this.notificationStackView);
 
         this.closeButton = makeCloseButton();
-        this.closeButton.connect('clicked', Lang.bind(this, function() {
-            source.destroy();
-            source.emit('done-displaying-content');
-        }));
         this.notificationStackWidget.add_actor(this.closeButton);
         this._stackedNotifications = [];
 
@@ -2414,6 +2410,7 @@ const MessageTray = new Lang.Class({
 
             let closeButton = this._summaryBoxPointerItem.closeButton;
             closeButton.show();
+            this._summaryBoxPointerCloseClickedId = closeButton.connect('clicked', Lang.bind(this, this._hideSummaryBoxPointer));
             this._summaryBoxPointerItem.prepareNotificationStackForShowing();
         } else if (this._clickedSummaryItemMouseButton == 3) {
             this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu;
@@ -2523,6 +2520,8 @@ const MessageTray = new Lang.Class({
         this._summaryBoxPointer.bin.child = null;
         this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
         this._summaryBoxPointerContentUpdatedId = 0;
+        this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
+        this._summaryBoxPointerCloseClickedId = 0;
         this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
         this._summaryBoxPointerDoneDisplayingId = 0;